package com.ruoyi.project.lely.bean.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import java.time.LocalDateTime;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

/**
 * 意见反馈
 *
 * @author luoyong
 */
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Data
@TableName(value = "`ly_feedback`", autoResultMap = true)
public class LyFeedback {


    @ApiModelProperty("ID")
    @TableId("id")
    private Long id;


    @NotNull
    @ApiModelProperty("用户表的用户ID")
    @TableField(value = "`user_id`")
    private Long userId;


    @Length(max = 63, message = "用户名称长度不能超过63位")
    @NotEmpty
    @ApiModelProperty("用户名称")
    @TableField(value = "`username`")
    private String username;


    @Length(max = 20, message = "手机号长度不能超过20位")
    @NotEmpty
    @ApiModelProperty("手机号")
    @TableField(value = "`mobile`")
    private String mobile;


    @Length(max = 63, message = "反馈类型长度不能超过63位")
    @NotEmpty
    @ApiModelProperty("反馈类型")
    @TableField(value = "`feed_type`")
    private String feedType;


    @Length(max = 1023, message = "反馈内容长度不能超过1023位")
    @NotEmpty
    @ApiModelProperty("反馈内容")
    @TableField(value = "`content`")
    private String content;


    @NotNull
    @ApiModelProperty("状态")
    @TableField(value = "`status`")
    private Integer status = 1;


    @ApiModelProperty("是否含有图片")
    @TableField(value = "`has_picture`")
    private Integer hasPicture;


    @Length(max = 1023, message = "图片地址列表，采用JSON数组格式长度不能超过1023位")
    @ApiModelProperty("图片地址列表，采用JSON数组格式")
    @TableField(value = "`pic_urls`")
    private String picUrls;


    @ApiModelProperty("创建时间")
    @TableField(value = "`create_time`", fill = FieldFill.INSERT)
    private LocalDateTime createTime;


    @ApiModelProperty("更新时间")
    @TableField(value = "`update_time`", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;


    @ApiModelProperty("逻辑删除")
    @TableField(value = "`deleted`", fill = FieldFill.INSERT)
    private Integer deleted;

}
